from django.urls import path

from . import views

urlpatterns = [

]

from rest_framework.routers import DefaultRouter, SimpleRouter

#  1.实例化
router = SimpleRouter()

# 2. 注册路由--给你的路由起个名字
router.register('books', views.BookViewSet)

print(router.urls)
# 3. 将 路由对象 中的urls 添加到 路由列表
urlpatterns += router.urls


